Skip to main content
Version: 4.x.x

UseCacheOptionsType


import { UseCacheOptionsType } from "@hyper-fetch/react"

Description

Defined in react/src/hooks/use-cache/use-cache.types.ts:12

Preview

type UseCacheOptionsType<T> = {
deepCompare: boolean | typeof isEqual;
dependencyTracking: boolean;
initialData: CacheValueType<ExtractResponseType<T>, ExtractErrorType<T>>[data] | null;
}

Structure

{
deepCompare: boolean | typeof isEqual;
dependencyTracking: boolean;
initialData: {
...params1: ResponseReturnType<Response, Error, Adapter>;
...params2: ResponseDetailsType;
cacheTime: number;
clearKey: string;
garbageCollection: number;
}[data] | null;
}